﻿using System;
using System.Windows.Forms;

namespace WFCSharp_I
{
    public partial class BasicControl : Form
    {
        public BasicControl()
        {
            InitializeComponent();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            linkLabel1.Links[0].LinkData = "http://cncaptech.vn";
            textBox1.Text = "Enter your user name";
            textBox2.Text = "Enter your password";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //MessageBox.Show("User name : " + textBox1.Text + Environment.NewLine +  "Passowrd" + textBox2.Text);
            if (checkBox1.CheckState == CheckState.Indeterminate)
                MessageBox.Show("Checkedbox state : Indeterminate");
            else if (checkBox1.CheckState == CheckState.Checked)
                MessageBox.Show("Checkedbox state : Checked");
            else if (checkBox1.CheckState == CheckState.Unchecked)
                MessageBox.Show("Checkedbox state : UnChecked");

            checkBox1.CheckState = CheckState.Unchecked;


        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            MessageBox.Show("Clicked : " + linkLabel1.Links[0].LinkData);
        }
    }
}
